STEP 11: Using the information we have in our function, let's use logic to figure out if our animal is a fish!

The logical operator and returns True if both statements on either side of the and are True.

  • From , drag if and indented inside classify_animal().
  • Rewrite the if-and statement to look like this: if·has_scales·and·eggs_in_water:¬
  • From add String Variable indented inside the if-and block.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)